import Vue from "vue"
import VueRouter from "vue-router"

import home from '@/pages/home/home'
import list from '@/pages/list/list'
import shopcar from '@/pages/shopcar/shopcar'
import user from '@/pages/user/user'
import register from '@/pages/user/register'
import signIn from '@/pages/user/signIn'
import goodsDetails from '@/pages/details/goodsDetails'

Vue.use(VueRouter)

const routes = [{
	path: "/",
	component: home
}, {
	path: "/list",
	name: "list",
	props: true,
	component: list
}, {
	path: "/goodsDetails/:id",
	name: "goodsDetails",
	props: true,
	component: goodsDetails
}, {
	path: "/shopcar",
	component: shopcar
}, {
	path: "/user",
	component: user
}, {
	name: 'signIn',
	path: '/signIn',
	component: signIn
}, {
	name: 'register',
	path: '/register',
	component: register
}]

export default new VueRouter({
	routes
})
